<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Building from Source</title>
  <link rel="stylesheet" type="text/css" href="../mbgstyle.css" />
</head>
<body>
<h1>Building from Source</h1>
<p>All MyBatis Generator (MBG) distributions include source code.  The only compile time dependency
is on <code>ant.jar</code> - for successful compilation of the included Ant task.
It is straight forward to compile MBG from source - simply unzip the source in
a distribution and compile it with your favorite tool.</p>
<p>The MBG distribution does not contain the tests that are run during the build,
or other classes that are a necessary part of the build.  If you would like to
inspect those classes, or build MBG from the very latest version of the source code
at Google then follow these steps:</p>
<ol>
  <li>MBG is built with Apache Maven.  First you must get maven
      running.  If you are new to Maven, here are the most simple steps (for Windows):
      <ol type="a">
        <li>Download a Maven distribution from <a target="_blank" href="http://maven.apache.org/">
          http://maven.apache.org/</a></li>
        <li>Unzip the distribution somewhere convenient</li>
        <li>Setup environment variables and the PATH.  Examples:<br/>
            set JAVA_HOME=C:\JavaTools\jdk1.6.0_17<br/>
            set M2_HOME=C:\JavaTools\apache-maven-3.0<br/>
            set PATH=%PATH%;%M2_HOME%\bin;
        </li>
      </ol>
  </li>
  <li>Do a Subversion checkout of the source tree from the location
    <a target="_blank" href="https://mybatis.googlecode.com/svn/sub-projects/generator/trunk/core/">
    https://mybatis.googlecode.com/svn/sub-projects/generator/trunk/core/</a>
    (You may use any Subversion client you prefer.  We recommend
    <a target="_blank" href="http://tortoisesvn.tigris.org/">TortoiseSVN</a>.)
  </li>
  <li>Open a command window in the directory where you checked out the source and
      run the command <code>mvn clean install</code> - or any of the other Maven lifecycle commands.
      You can use the <code>mvn site</code> command to generate the code coverage reports, but the
      MyBatis website is not built with Maven at this time.
  </li>
</ol>


</body>
</html>
